<template>
  <cj-dialog :isShow="showAddTeacher" @closeDialog="closeDialog">
    <section class="c-w80 c-p c-maxw640 c-bg-white c-br10">
      <div class="c-flex-row c-flex-center c-pv32 c-ph24 c-fs26">
        <div v-if="userVipType == 1">
          登入升级vip才可以添加{{isBCompany == 1 ? '蜜友客服' : '班主任'}}微信哦！
        </div>
        <img v-else class="c-w100" :src="$addXossFilter(teacherQrCode)" alt="">
      </div>
      <div @click="closeDialog" class="c-pb32 c-flex-row c-flex-center">
        <span class="iconfont">&#xe61b;</span>
      </div>
    </section>
  </cj-dialog>
</template>
<script>
import cjDialog from '@/plugin/cjDialog/cjDialog.vue';
import { mapState } from 'vuex';
export default {
  components: {
    cjDialog,
  },
  props: {
    teacherQrCode: {
      type: String,
      default: ""
    },
  },
  computed: {
    ...mapState({
      showAddTeacher: state => state.oem_store.showAddTeacher,
      userVipType: state => state.oem_store.userVipType,
    })
  },
  data() {
    return {
      isBCompany: localStorage.getItem("companyId") == "ldwk" ? 1 : 0,
    };
  },
  deactivated() {
    this.closeDialog();
  },
  methods: {
    closeDialog() {
      this.$store.commit('updateShowAddTeacher', false);
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
